package com.goktech.service.imp;

import com.goktech.entity.User;
import com.goktech.mapper.UserMapper;
import com.goktech.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName userServiceImp
 * @Description TODO
 * @Author 邱华英
 * @Date 2022/9/19 19:53
 * @Version 1.0
 */

@Service("UserService")
public class userServiceImp implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public int insertUser(User u) {
        return userMapper.insertUser(u);
    }

    @Override
    public int updateUser(User u) {
        return userMapper.updateUser(u);
    }

    @Override
    public int deleteUser(User u) {
        return userMapper.deleteUser(u);
    }

    @Override
    public User findByUser(User u) {
        return userMapper.findByZhanghao(u);
    }

    @Override
    public List<User> findByAll(int begin,int end) {
        return userMapper.findByAll(begin,end);
    }

    @Override
    public List<User> findLikeZhanghao(User u) {
        return userMapper.findLikeZhanghao(u);
    }

    @Override
    public List<User> findLikeUserName(User u) {
        return userMapper.findLikeUserName(u);
    }

    @Override
    public User findByZhanghaoPassword(User u) {
        return userMapper.findZhanghaoPassword(u);
    }

    @Override
    public User findByZhanghao(User u){return  userMapper.findByZhanghao(u);}
}
